package com.example.group_20.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: 栋
 * @data: 2023/8/26
 * @descriptions:
 */

//public class CorsConfig implements WebMvcConfigurer {
//    @Override
//    public void addCorsMappings(CorsRegistry registry){
//        registry.addMapping("http://localhost:8080/**")
//                .allowedOrigins("*")
//                .allowedMethods("POST","GET","PUT","OPTIONS","DELETE")
//                .maxAge(16800)
//                .allowedHeaders("*")
//                .allowCredentials(true);
//    }
//}
